<nav class="navbar navbar-inverse">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">The Blog</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <ul class="nav navbar-nav">
                <li class="nav-choice"><a href="/blog/category/军事">军事</a></li>
                <li class="nav-choice"><a href="/blog/category/政治">政治</a></li>
                <li class="nav-choice"><a href="/blog/category/新闻">新闻</a></li>
            </ul>
            <script>
                var title = $(document).attr("title");
                $(".nav-choice a").each(function () {
                    var text = ($(this).text());
                    if(text==title){
                        console.log(text)
                        $(this).parent().addClass("active");
                    }
                })
            </script>
            <form class="navbar-form navbar-right" action="/blog/search/">
                <div class="form-group">
                    <input type="text" class="form-control" name="q" placeholder="Search" value="{{ keyword }}">
                </div>
                <button type="submit" class="btn btn-info">Submit</button>
            </form>
            <ul class="nav navbar-nav navbar-right">
                {% if request.user.username %}
                    <li class="dropdown" id="personalCenter">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
                           aria-expanded="false">个人中心<span class="caret"></span></a>
                        <ul class="dropdown-menu">
                            <li>
                                <a href="/blog/{{ request.user.username }}">
                                <img class="img-responsive center-block" src="/media/{{ request.user.avatar }}" width="150px" height="150px" alt="">
                                </a>
                            </li>
                            <li><a href="/blog/{{ request.user.username }}">Personal Blog</a></li>
                            <li><a href="/blog/backend/add_article">Post a Article</a></li>
                            <li><a href="#">Something else here</a></li>
                            <li role="separator" class="divider"></li>
                            <li><a href="/logout/">注销</a></li>
                        </ul>
                    </li>
                {% else %}
                    <li><a href="/login/">登录</a></li>
                    <li><a href="/reg/">注册</a></li>
                {% endif %}
            </ul>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>

<nav aria-label="breadcrumb">
  <ol class="breadcrumb">
    <li class="breadcrumb-item"><a href="/">Home</a></li>
    {% if article.category %}
    <li class="breadcrumb-item"><a href="#">{{ article.category }}</a></li>
    {% endif %}
  {% if tkd.title %}
      <li class="breadcrumb-item"><a href="#">{{ tkd.title }}</a></li>
  {% endif %}

  </ol>
</nav>
{#<script>#}
{#    function DrawImage02(hotimg) {#}
{#        $(hotimg).jqthumb({#}
{#            classname : 'jqthumb',#}
{#            width : '30px',//宽度#}
{#            height : '30px',//高度#}
{#            position : { y: '50%', x: '50%'},//从图片的中间开始产生缩略图#}
{#            zoom : '1',//缩放比例#}
{#            method : 'auto',//提交方法，用于不同的浏览器环境，默认为‘auto’#}
{#        });#}
{#    }#}
{#</script>#}
